﻿using System;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Routing;
using Jackie.Research.Wcf.Rest.Service;

namespace Jackie.Research.Wcf.Rest.Host
{
    public class Global : HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes();
        }

        private void RegisterRoutes()
        {
            // Edit the base address of Service1 by replacing the "Service1" string below
            //RouteTable.Routes.Add(new ServiceRoute("Service1", new WebServiceHostFactory(), typeof(Service1)));
            RouteTable.Routes.Add(new ServiceRoute("microblog", new WebServiceHostFactory(),
                                                   typeof(MicroblogService)));
            RouteTable.Routes.Add(new ServiceRoute("echo", new WebServiceHostFactory(), typeof(EchoService)));
        }
    }
}
